package com.xbk.seckill.stock.domain.model.enums;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 库存编码模式
 *
 * @author xiexu
 * @date 2025/3/8 21:45
 */
public enum SeckillStockBucketArrangementMode {

    /**
     * 按总量模式编排
     */
    TOTAL(1),

    /**
     * 按增量模式编排
     */
    INCREMENTAL(2);

    private final Integer mode;

    SeckillStockBucketArrangementMode(Integer mode) {
        this.mode = mode;
    }

    public static boolean isTotalArrangementMode(Integer mode) {
        return TOTAL.mode.equals(mode);
    }

    public static boolean isIncrementalArrangementMode(Integer mode) {
        return INCREMENTAL.mode.equals(mode);
    }

    public int getMode() {
        return mode;
    }

}
